home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / extra / stricmp.c < prev    next >
C/C++ Source or Header  |  1999-01-01  |  475b  |  22 lines

  1. #include <ctype.h>
  2. #include <string.h>
  3.  
  4. /*
  5. ** stricmp() - Compare two strings in casesensitivly.
  6. **
  7. ** Made by Kasper B. Graversen (c) 1996
  8. **
  9. ** fixed by phx 01/98
  10. **
  11. ** This is freeware - use at own risc.
  12. */
  13.  
  14. int stricmp(const char *str1, const char *str2)
  15. {
  16.     while(tolower((unsigned char)*str1) == tolower((unsigned char)*str2)) {
  17.         if(!*str1) return(0);
  18.         str1++;str2++;
  19.     }
  20.     return(tolower(*(unsigned char *)str1)-tolower(*(unsigned char *)str2));
  21. }
  22.